<extend name="Base/common"/>
<block name="body">
<body class="rank-page2">

<div class="container">
    <!--<header class="page-head2">
        <table class="tab-table">
            <tbody><tr>
                <td class="tab">
                    <a href="#my-rank" class="active">我的总排名</a>
                </td>
            </tr>
            </tbody></table>
    </header>-->
    <div class="panel-head_my">
        <h1 class="title"><i class="name">我的总排名</i>
        </h1>
    </div>
    <div class="tab-detail my-rank" style="display:block">

        <div class="rank-display" init-name="myRankInfo-html">
            <div class="rank-cls">
                <div class="new-rank-container unparticipate">
                    <if condition="empty($myRank['rank'])">
                    暂无排名
                    <else /> 
                    第<span class="new-rank-no">{$myRank['rank']}</span>名
                    </if>
                    <div class="new-rank-flag equal">3248</div>
                    <div class="new-total-num-box">共<span class="new-total-num">{:count($rankList)}</span>人</div>
                </div>
                <div class="new-toast">大奖很丰富，快来参与吧</div>
            </div>
        </div>

    </div>
    <div class="panel-head_my">
        <h1 class="title"><i class="name" style="display: inline-block;width: 90%;">总战绩榜</i>
        </h1>
    </div>
    <section class="page-body">
        <div class="tab-list" id="tab-list">
            <div class="tab-detail2" style="display: none">
               <!-- <p class="header-info2">下拉加载更多...</p>-->
                <ol class="rank-common-list2">
                    <div class="no-content-pl2">
                        <div class="wenan"><span class="align-left">大赛初始</span><span class="align-right">暂无排名</span></div>
                        马上参与赢取大奖吧!
                    </div>
                </ol>
               <!-- <p class="footer-info">加载中...</p>-->
            </div>
            <div class="tab-detail2 continuous-hit2">
                <!--<p class="header-info2">下拉加载更多...</p>-->
                <ol class="rank-common-list2" >
                    <volist name="rankList" id="rank" key="k" offset="0" length='10'>
                    <li>
                        <if condition="get_follow_info($rank['user_id'],'headimgurl') neq ''">
                         <span class="avatar" style="display:inline-block;background-image:url({:get_follow_info($rank['user_id'],'headimgurl')})"></span>
                        <else />
                        <span class="avatar" style="display:inline-block;background-image:url(__IMG__/avatar.png)"></span>
                        </if>
                        <span class="username">
                            <small>{:get_follow_info($rank['user_id'],'nickname')}</small><br>
                            <strong class="userNo">top:{$k}</strong>
                        </span>

                        <span class="bean-count">
                            <strong>{$rank.bean}</strong><br>
                            <em>金豆</em>

                        </span>
                    </li>
                    </volist>
                </ol>
                <!--<p class="footer-info">加载中...</p>-->
            </div>
        </div>
    </section>
</div>
<block name="script">
    <script type="text/javascript">
        /*
        $(function(){
            scroll();
        })
        function ajaxs(){
            var obj=$("#ajax_content");
            var page=obj.attr("data");
            var url="{:U('RankingList/ajax_content')}";
            $.ajax({
                url:url,
                data:{'p':page},
                type:'POST',
                timeout:5000,
                dataType:'json',
                beforeSend:function(XMLHttpRequest){
                    //alert('发送请求前弹出我');
                    $(".load").show();
                },
                //请求成功后的回调函数
                success:function(d,textStatus,XMLHttpRequest){
                    console.log(d);
                    var data= d.data;
                    var html="";
                    if(d.status){
                       // $(".load").find('span').html('已是最后一页');
                       // setTimeout('load_hide()',1000);
                    }else{

                        $.each(data,function(key,val){
                            html+='<li>';
                            if(val.headimgurl){
                                html+='<span class="avatar" style="display:inline-block;background-image:url('+val.headimgurl+')"></span>';
                            }else{
                                html+='<span class="avatar" style="display:inline-block;background-image:url(__IMG__/avatar.png)"></span>';
                            }
                            html+='<span class="username">';
                            if(val.nickname){
                                html+='<small>'+val.nickname+'</small><br>';
                            }else{
                                html+='<small></small><br>';
                            }
                            html+='<strong class="userNo">top:'+val.top+'</strong>';
                            html+='</span>';
                            html+='<span class="bean-count">';
                            html+='<strong>'+val.bean+'</strong><br>';
                            html+='<em>金豆</em>';
                            html+='</span>';
                            html+='</li>';
                        })
                       // $(".load").hide();
                        obj.append(html);
                        page++;
                        obj.attr("data",page);
                    }
                    setTimeout('scroll()',1000);
                },
                error:function(XMLHttpRequest,textStatus,errorThrown){
                    //XMLHttpRequest 对象、textStatus:错误信息、errorThrown:捕获的异常对象
                    $(".load").hide();
                    //alert(errorThrown);
                }
            })
        }
        function scroll(){
            $(window).bind("scroll",function(){
                if($(window).height()+$(document).scrollTop()>=($(document).height()-40)){
                    $(window).unbind("scroll");
                    ajaxs()
                }
            });
        }*/
    </script>
</block>
</block>